package com.leyou.user.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

@TableName("tb_user")
@Data
public class User {
    @TableId(type = IdType.AUTO)
    private Long id;
    @Length(min = 4,max = 12,message = "用户名必须在4-12位之间！")
    private String username;
    @Length(min = 6,max = 16,message = "密码必须在4-12位之间！")
    private String password;
    private String phone;
    @Length(min = 4,max = 12,message = "昵称必须在4-12位之间！")
    private String nickname;//昵称
    private String sex;//男或女
    private String birthday;//出生日期
    private String address;//所在地址
    private String job;//职业
    private String image;//头像
    private Date createTime;
    private Date updateTime;
}